package cn.sinjet.viewmodel;

import java.util.HashMap;

import com.mgroup.wazehelper.R;

public class PageDefine {
	public static final int PAGE_HOME =	0x0080; //
	public static final int PAGE_ERR_QUERY =	0x0082; //
	
	public static final int PAGE_CAR_CONDITION =	0x0001; //
//	public static final int PAGE_QUERY_ERR =	0x0002; //
	public static final int PAGE_CAR_METER =	0x0003; //
	public static final int PAGE_CAR_CONTROL=	0x0004; //
//	public static final int PAGE_SETTINGS =	0x0004; //
	public static final int PAGE_SETTING_NAVI =	0x0005; //
	public static final int PAGE_SETTING_GENERAL = 0x0006;
	public static final int PAGE_HUD_SET = 0x0007;
	public static final int PAGE_ABOUT = 0x0008;
	public static final int PAGE_CONTACT_US = 0x0009;
	public static final int PAGE_NAVI_SIMPLE_SET = 0x000A;
	public static final int PAGE_NAVI_STRATEGY = 0x000B;
	public static final int PAGE_HUD_SET_SCREEN = 0x000C;
	public static final int PAGE_RADAR = 0x000D;
	public static final int PAGE_VOICE_ALARM_SET = 0x000E;
	
	public static final int PAGE_OBD_DISCRIPTION = 0x0020;
	public static final int PAGE_CAR_CONDITION_DETAIL = 0x0021;
	public static final int PAGE_CAR_CONDITION_VIN = 0x0022;
	public static final int PAGE_CAR_ERR_DETECT = 0x0023;
	public static final int PAGE_CAR_TPMS = 0x0024;
	public static final int PAGE_FAST_DECTECT = 0x0025;
	
   public static final byte PAGE_MY_FAVOR = 0x02;
   public static final byte PAGE_MY_INFOS = 0x03;
   public static final byte PAGE_NAVI_SELECT = 0x34;
   public static final byte PAGE_NAVI_START = 0x35;
   public static final byte PAGE_POI_SEARCH = 0x36;
   public static final byte PAGE_ROUTE_DETAIL = 0x37;
   public static final byte PAGE_ROUTE_PLAN = 0x38;
   public static final byte PAGE_SIMPLE_HUD = 0x39;
   public static final byte PAGE_SIMPLE_NAVI = 0x3A;
   public static final byte PAGE_PLAN_SET = 0x3B;
	   
   public static final int PAGE_PHONE_CALL_LOG = 0x046;
	public static final int PAGE_PHONE_CONTACT = 0x047;
	
	public static final int PAGE_SCREEN_OFF = 0x0010;
	public static final int PAGE_FAST_DETECT = 0x0011;
    ///////////////////////////////////////////
	private static HashMap<Integer, Integer> mPageMap = new HashMap<Integer, Integer>();
	
	static {
		mPageMap.put(PAGE_CAR_CONDITION, R.layout.page_car_condition);
//		mPageMap.put(PAGE_SETTINGS, R.layout.page_settings);
		mPageMap.put(PAGE_CAR_METER, R.layout.page_car_meter);
//		mPageMap.put(PAGE_SETTING_NAVI, R.layout.page_setting_navi);
		mPageMap.put(PAGE_SETTING_GENERAL, R.layout.page_setting_general);
		mPageMap.put(PAGE_HUD_SET, R.layout.page_setting_hud);
		mPageMap.put(PAGE_HUD_SET_SCREEN, R.layout.page_setting_hud_screen);
		mPageMap.put(PAGE_OBD_DISCRIPTION, R.layout.page_obd_discription);
		mPageMap.put(PAGE_SCREEN_OFF, R.layout.page_screen_off);
		mPageMap.put(PAGE_ABOUT, R.layout.page_about);
		mPageMap.put(PAGE_CONTACT_US, R.layout.page_contact_us);
		mPageMap.put(PAGE_CAR_CONDITION_DETAIL, R.layout.page_car_condition_detail);
		mPageMap.put(PAGE_CAR_CONDITION_VIN, R.layout.page_car_condition_vin);
		mPageMap.put(PAGE_CAR_TPMS, R.layout.page_car_tpms);
		mPageMap.put(PAGE_NAVI_SIMPLE_SET, R.layout.page_setting_navi_simple_set);
		mPageMap.put(PAGE_NAVI_STRATEGY, R.layout.page_navi_strategy);
		mPageMap.put(PAGE_CAR_CONTROL, R.layout.page_car_control);
		mPageMap.put(PAGE_VOICE_ALARM_SET, R.layout.page_setting_voice_alarm);
		
	}
	
	public static int getLayoutByPageId(int pageId){
		if(mPageMap.containsKey(pageId))
			return mPageMap.get(pageId);
		return R.layout.page_setting_general;
	}
}

